package com.ias.agdis_r.activity.message;

import com.ias.agdis_r.R;
import com.ias.agdis_r.activity.BaseKeyActivity;

import android.app.Activity;
import android.content.Context;
import android.graphics.Rect;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.ScrollView;
import android.widget.TextView;

/**
 * 
 * @author qibo.yu
 * @version 2015年8月28日 下午12:21:48
 **/
public class MessageSendDetalisActivity extends BaseKeyActivity {

	public static final String EXTRA_MESSAGE_TEXT = "com.ias.agdis_r.message.txt";

	private TextView msgTxt;
	private  ScrollView scrollView;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.view_message_send);
		overridePendingTransition(0, 0);

		scrollView = (ScrollView) findViewById(R.id.msg_scroll);

		msgTxt = (TextView) findViewById(R.id.msg_txt);

		msgTxt.setText(getIntent().getStringExtra(EXTRA_MESSAGE_TEXT));

		msgTxt.setOnClickListener(new View.OnClickListener() {

			@Override
			public void onClick(View v) {
				finish();
			}
		});

	}

	@Override
	public void onWindowFocusChanged(boolean hasFocus) {
		super.onWindowFocusChanged(hasFocus);
		if(hasFocus){
			Rect outRect = new Rect();
			getWindow().findViewById(Window.ID_ANDROID_CONTENT).getDrawingRect(outRect);
			msgTxt.setMinHeight(outRect.height());
		}
	}

}
